-
Notifications
You must be signed in to change notification settings - Fork 120
[WCiOS17] Address deprecations on account and auth flows trait updates #16427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WCiOS17] Address deprecations on account and auth flows trait updates #16427
Conversation
|
|
RafaelKayumov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Left only 1 nit comment
| registerForTraitChanges([UITraitVerticalSizeClass.self, UITraitUserInterfaceStyle.self]) { (self: Self, _) in | ||
| // Hide image in compact height sizes (e.g. landscape iPhones) | ||
| // With limited space, text description should have higher priority | ||
| self.imageView.isHidden = self.traitCollection.verticalSizeClass == .compact | ||
|
|
||
| self.updateViewAppearances() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: Should we separately register for UITraitVerticalSizeClass.self and UITraitUserInterfaceStyle.self? Also should we check against the previous trait for the UITraitUserInterfaceStyle as it was done in the previous implementation?
registerForTraitChanges([UITraitVerticalSizeClass.self]) { (self: Self, _) in
// Hide image in compact height sizes (e.g. landscape iPhones)
// With limited space, text description should have higher priority
self.imageView.isHidden = self.traitCollection.verticalSizeClass == .compact
self.updateViewAppearances()
}
registerForTraitChanges([UITraitUserInterfaceStyle.self]) { (self: Self, previousTraitCollection) in
gaurd previousTraitCollection.hasDifferentColorAppearance(comparedTo: traitCollection) else {
return
}
// handle dynamic color appearance changes.
updateViewAppearances()
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good point, my change would slightly change the implementation, not just refactor from the old API. Updated de08354

Closes WOOMOB-1305
Description
This PR addresses iOS17 deprecation warnings in account and authentication flows, as well as settings. We address two types:
Changes
UITraitAPIUIKit.UITextViewinterface we've lost URL as a parameter, and the return type is no longerBoolbut optionalUIAction?, so we have to return nil to prevent the default action.Test Steps
Screenshots
ScreenRecording_12-04-2025.privacy.480p.mov